//
//  Booking.m
//  mUBB
//
//  Created by Cosmin Stirbu on 2/20/13.
//  Copyright (c) 2013 Cosmin Stirbu. All rights reserved.
//

#import "Booking.h"

#define DATE_FORMAT @"yyyy-MM-dd hh:mm"

@implementation Booking

@synthesize bookingId, endDate, room, startDate, studyGroups, teacher, typeOfClass, selfURL, course;

- (id)init {
    self = [super init];
    if (self) {
        studyGroups = [NSMutableArray new];
    }
    return self;
}

+ (Booking *)bookingWithBooking:(Booking *)booking {
    Booking *_booking = [Booking new];
    _booking.bookingId = booking.bookingId;
    _booking.startDate = booking.startDate;
    _booking.endDate = booking.endDate;
    _booking.studyGroups = booking.studyGroups;
    _booking.typeOfClass = booking.typeOfClass;
    _booking.course = booking.course;
    _booking.teacher = booking.teacher;
    _booking.selfURL = booking.selfURL;
    _booking.room = booking.room;
    return _booking;
}

- (void)setStudyGroups:(NSMutableArray *)_studyGroups {
    studyGroups = [NSMutableArray arrayWithArray:_studyGroups];
}

@end
